<?php
namespace app\cms\controller;
use framework\ext\Check;
/* *
 * 网站配置
 * */
class SettingController extends \app\base\controller\AdminController{

    //模板列表
    public function index(){
        $this->config = model('setting')->_select();
        $this->display();  
    } 
    
    public function saveconfig(){
        if($this->isPost()){
            $data['title']  = form('post.name');
            $data['content']  = form('post.value');;
            $rel = model('setting')->_update($data,array('title' => $data['title']));
            if($rel){
                echo "修改成功";
            }else{
                echo "修改失败";
            }
        }
    }
}